//
//  MyTextField.m
//  CenturyInterconnection
//
//  Created by l-sheng on 7/4/16.
//  Copyright © 2016 Shanghai DuRui Information Technology Company. All rights reserved.
//

#import "MyTextField.h"

@implementation MyTextField


+(id)TextField:(NSString *)labelString{
    
    MyTextField * textField = [[MyTextField alloc] init];
    
    textField.frame = CGRectMake(20, 0, KScreenWidth-40, 44);
    textField.clearButtonMode = UITextFieldViewModeAlways;
    textField.returnKeyType = UIReturnKeyDone;
    textField.textAlignment = NSTextAlignmentLeft;
    textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    
    //leftview
    UILabel * leftLabel = [[UILabel alloc] init];
    leftLabel.frame = CGRectMake(5, 5, 20, 20);
    leftLabel.text = labelString;
    leftLabel.textColor = RGBCOLOR(205, 205, 205, 1);
    [leftLabel sizeToFit];
    textField.leftView = leftLabel;
    textField.leftViewMode = UITextFieldViewModeAlways;
    
    return textField;
}

@end
